<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>设置 - 外卖APP</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
    <style>
        body {
            margin: 0;
            padding: 0;
            background: #f5f5f5;
            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
            color: #333;
        }
        .phone-container {
            width: 390px;
            height: 844px;
            margin: 20px auto;
            background: white;
            position: relative;
            overflow: hidden;
            box-shadow: 0 0 20px rgba(0,0,0,0.1);
            border-radius: 40px;
        }
        .content {
            height: 100%;
            overflow-y: auto;
            background-color: #f8f9fa;
        }
        .header {
            background: #0095ff;
            color: white;
            padding: 16px;
            position: sticky;
            top: 0;
            z-index: 100;
            display: flex;
            align-items: center;
            gap: 15px;
        }
        .back-btn {
            color: white;
            text-decoration: none;
            font-size: 20px;
            display: flex;
            align-items: center;
        }
        .header-title {
            font-size: 18px;
            font-weight: 600;
            margin: 0;
            flex-grow: 1;
            text-align: center;
            margin-right: 24px;
        }
        .settings-container {
            padding: 15px;
        }
        .settings-group {
            background: white;
            border-radius: 12px;
            margin-bottom: 15px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.03);
            overflow: hidden;
        }
        .settings-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px;
            border-bottom: 1px solid #f0f0f0;
        }
        .settings-item:last-child {
            border-bottom: none;
        }
        .settings-label {
            font-size: 15px;
            color: #333;
        }
        .settings-value {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #999;
            font-size: 14px;
        }
        .settings-value i {
            font-size: 14px;
        }
        .switch {
            position: relative;
            display: inline-block;
            width: 40px;
            height: 20px;
        }
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 20px;
        }
        .slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 2px;
            bottom: 2px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        input:checked + .slider {
            background-color: #0095ff;
        }
        input:checked + .slider:before {
            transform: translateX(20px);
        }
        .section-title {
            font-size: 14px;
            color: #999;
            padding: 0 5px;
            margin: 20px 0 10px;
        }
        .logout-btn {
            display: block;
            width: 100%;
            padding: 15px;
            text-align: center;
            color: #ff4d4f;
            font-size: 15px;
            background: white;
            border: none;
            border-radius: 12px;
            margin-top: 30px;
            cursor: pointer;
            box-shadow: 0 2px 10px rgba(0,0,0,0.03);
        }
        .version-info {
            text-align: center;
            padding: 20px 0;
            color: #999;
            font-size: 12px;
        }
    </style>
</head>
<body>
    <div class="phone-container">
        <div class="content">
            <div class="header">
                <a href="user.html" class="back-btn">
                    <i class="bi bi-chevron-left"></i>
                </a>
                <h1 class="header-title">设置</h1>
            </div>

            <div class="settings-container">
                <div class="settings-group">
                    <a href="#" class="settings-item" style="text-decoration: none; color: inherit;">
                        <div class="settings-label">账号与安全</div>
                        <div class="settings-value">
                            <i class="bi bi-chevron-right"></i>
                        </div>
                    </a>
                    <a href="#" class="settings-item" style="text-decoration: none; color: inherit;">
                        <div class="settings-label">支付管理</div>
                        <div class="settings-value">
                            <i class="bi bi-chevron-right"></i>
                        </div>
                    </a>
                </div>

                <div class="section-title">通知设置</div>
                <div class="settings-group">
                    <div class="settings-item">
                        <div class="settings-label">推送通知</div>
                        <label class="switch">
                            <input type="checkbox" checked>
                            <span class="slider"></span>
                        </label>
                    </div>
                    <div class="settings-item">
                        <div class="settings-label">订单状态通知</div>
                        <label class="switch">
                            <input type="checkbox" checked>
                            <span class="slider"></span>
                        </label>
                    </div>
                    <div class="settings-item">
                        <div class="settings-label">营销活动通知</div>
                        <label class="switch">
                            <input type="checkbox">
                            <span class="slider"></span>
                        </label>
                    </div>
                </div>

                <div class="section-title">隐私设置</div>
                <div class="settings-group">
                    <div class="settings-item">
                        <div class="settings-label">位置信息</div>
                        <label class="switch">
                            <input type="checkbox" checked>
                            <span class="slider"></span>
                        </label>
                    </div>
                    <div class="settings-item">
                        <div class="settings-label">个性化推荐</div>
                        <label class="switch">
                            <input type="checkbox" checked>
                            <span class="slider"></span>
                        </label>
                    </div>
                </div>

                <div class="section-title">通用</div>
                <div class="settings-group">
                    <a href="#" class="settings-item" style="text-decoration: none; color: inherit;">
                        <div class="settings-label">清除缓存</div>
                        <div class="settings-value">
                            <span>23.5MB</span>
                            <i class="bi bi-chevron-right"></i>
                        </div>
                    </a>
                    <a href="#" class="settings-item" style="text-decoration: none; color: inherit;">
                        <div class="settings-label">关于我们</div>
                        <div class="settings-value">
                            <i class="bi bi-chevron-right"></i>
                        </div>
                    </a>
                    <a href="#" class="settings-item" style="text-decoration: none; color: inherit;">
                        <div class="settings-label">用户协议</div>
                        <div class="settings-value">
                            <i class="bi bi-chevron-right"></i>
                        </div>
                    </a>
                    <a href="#" class="settings-item" style="text-decoration: none; color: inherit;">
                        <div class="settings-label">隐私政策</div>
                        <div class="settings-value">
                            <i class="bi bi-chevron-right"></i>
                        </div>
                    </a>
                </div>

                <button class="logout-btn">退出登录</button>

                <div class="version-info">
                    外卖APP v1.0.0
                </div>
            </div>
        </div>
    </div>

    <script>
        // 开关切换效果
        document.querySelectorAll('.switch input').forEach(checkbox => {
            checkbox.addEventListener('change', function() {
                // 这里可以添加实际的设置变更逻辑
                console.log(this.parentNode.previousElementSibling.textContent + ' 设置已' + (this.checked ? '开启' : '关闭'));
            });
        });

        // 退出登录
        document.querySelector('.logout-btn').addEventListener('click', function() {
            if (confirm('确定要退出登录吗？')) {
                // 这里可以添加实际的退出登录逻辑
                window.location.href = 'index.html';
            }
        });
    </script>
</body>
</html> 